arrayIndex is package{
  -- test indexing into arrays
  
  main() do {
    II has type ref array of string;
    var II := array of {"alpha"; "beta"; "gamma"; "delta"};
    
    assert II[0]="alpha";
    assert II[1]="beta";
    assert II[2]="gamma";
    assert II[3]="delta";
    
    assert (II[4] default nonString)=nonString;
    assert (II[-1] default nonString)=nonString;
    
    var C := array of {0;1;2};
    
    C[1] := 4;
    assert C=array of {0;4;2};
  }
}